<?
require("config.php");

$location_status .= " | Add";

$show_backnav = "customer_menu";

require($rela_path . "bin/country.php");

$menutype = 2;

if (NULL!=$action){
   $field = array(
	"code",
	"username",
	"password",
		"firstname",
		"lastname",
		"age",
	"address",
	"zip",
	"city",
	"country",
	"tel",
	"fax",
	"email",
	"website",
		"profession",
		"education",
		"cardname",
	   "cardtype",
	   "cardno",
	   "expiration_date",
	   "registration_date",
	   "status",
	   "enrollment_date",
	"ccs_followed",
	);


   $content = array(
	$Code,
	$Username,
	$Password,
		$Firstname,
		$Lastname,
	    $Age,
	$Address,
	$Zip,
	$City,
	$Country,
	$Tel,
	$Fax,
	$Email,
	$Website,
		$Profession,
		$Education,
	    $Cardname,
	    $Cardtype,
	    $Cardno,
	    "$myYear-$myMonth-$myDay",
	   "$Year1-$Month1-$Day1",
	    $Status,
	    "$Year-$Month-$Day",
	$Followed,
	);

   myInsert($table,$field,$content);


   header("location:" . $rela_path . "share/msg.php?v=22");

   exit();

}

if (checkCode($table,$Code)){

	header("location:" . $rela_path . "share/msg.php?v=9001");
	exit();

}

require($rela_path . "inc/header.php");

?>

<form action="" method="post" name="form1">  

<!--hidden filed-->
<input name="action" type="hidden" value="add">
<input name="Code" type="hidden" value="<?print($Code)?>">





<br> 
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">
	
	<input type="image" src="../../images/bt_cancel.gif" width="78" height="23" onclick="Redirect('customer_menu.php',1);return false;"> 
	<input type="image" src="../../images/bt_save.gif" width="76" height="22"> 


    </td>
  </tr>
</table>
<table width="95%" border="0" align="center">
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top"> <div align="right"> </div>
      <table border="0">
        <tr> 
          <td class="tdheader">Code :</td>
          <td> <input type="text" class="text" name="Code" value=<?print($Code)?> DISABLED>
            </td>
        </tr>
        <tr> 
          <td class="tdheader">Username :</td>
          <td> <input type="text" class="text" name="Username"> </td>
        </tr>
        <tr> 
          <td class="tdheader">Password :</td>
          <td> <input type="text" class="text" name="Password"> </td>
        </tr>


        <tr> 
          <td height="3" class="tdheader">First Name :</td>
          <td height="3"> <input type="text" class="text" name="Firstname" size="35" value="">
              <font color="red">&nbsp;</font> <b></b></td>
        </tr>


        <tr> 
          <td height="3" class="tdheader">Last Name :</td>
          <td height="3"> <input type="text" class="text" name="Lastname" size="35" value="">
              <font color="red">&nbsp;</font> <b></b></td>
        </tr>


        <tr> 
          <td height="3" class="tdheader">Age :</td>
          <td height="3"> <input type="text" class="text" name="Age" value="">
              <font color="red">&nbsp;</font> <b></b></td>
        </tr>

        <tr> 
          <td class="tdheader">Address :</td>
          <td> <textarea class="text" name="Address" cols="40" rows="5"></textarea> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Zip Code :</td>
          <td> <input type="text" class="text" name="Zip" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td height="25" class="tdheader">City :</td>
          <td height="25"> <input type="text" class="text" name="City" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Country : </td>
            <td> <?print(FFPCountry("US"))?> </td>
        </tr>
        <tr> 
          <td class="tdheader">Tel :</td>
          <td> <input type="text" class="text" name="Tel" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Fax :</td>
          <td> <input type="text" class="text" name="Fax" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Email :</td>
          <td> <input type="text" class="text" name="Email" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Website :</td>
          <td> <input type="text" class="text" name="Website" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Profession :</td>
          <td> <input type="text" class="text" name="Profession" size="55" value=""> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Education :</td>
          <td> <textarea class="text" name="Education" cols="40" rows="5"></textarea> 
          </td>
        </tr>
        <tr> 
          <td class="tdheader">Credit Card Name :</td>
          <td> <input type="text" class="text" name="Cardname" size="55" value=""> 
          </td>
        </tr>

        <tr> 
          <td class="tdheader">Credit Card Type :</td>
          <td> 
		  
<?

$sourceData = array(
  "Visa",
  "American Express",
  "Master",
  );

FFPSelectBox("Cardtype",$Status,$sourceData,$sourceLabel);

?>		  
		  
		  
          </td>
        </tr>

        <tr> 
          <td class="tdheader">Credit Card No. :</td>
          <td> <input type="text" class="text" name="Cardno" size="55" value="">  
          </td>
        </tr>

        <tr> 
          <td class="tdheader">Expiration Date :</td>
          <td> <?print(FFPtime(date("Y-m-d H:i")))?>
          </td>
        </tr>



        <tr> 
          <td class="tdheader">Status :</td>
          <td> 
		  
<?

$sourceData = array(
  "Activate",
  "Member",
  "Graduate",
  );

FFPSelectBox("Status",$Status,$sourceData,$sourceLabel);

?>		  
		  
		  
          </td>
        </tr>



        <tr> 
          <td class="tdheader">Member Registration Date :</td>
          <td> 
		  
<?print(FFPdate1(date("Y-m-d H:i")))?>	
		  
		  
          </td>
        </tr>



        <tr> 
          <td class="tdheader">Latest Enrollment Date :</td>
          <td> 
		  
<?print(FFPdate(date("Y-m-d H:i")))?>	  
		  
		  
          </td>
        </tr>





<?

$Query = "select name from user_profile where type='1' or type='0'";
$r = myQuery($Query);

?>

        <tr> 
          <td class="tdheader">Followed by :</td>
          <td>
		  	  
		  <select class="select" name="Followed">
              <option value="" selected>SELECT</option>
			  <?for ($i=0;$i<count($r);$i++){?>
              <option value="<?echo $r[$i][0]?>"><?echo $r[$i][0]?></option>
			  <?}?>
            </select>
			
			</td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">
	
	
	<input type="image" src="../../images/bt_cancel.gif" width="78" height="23" onclick="Redirect('customer_menu.php',1);return false;"> 
	<input type="image" src="../../images/bt_save.gif" width="76" height="22"> 




    </td>
  </tr>
</table>
</form>
<br>
<br>
<br>
<?
require($rela_path . "inc/footer.php");
?>
